<div class="panel panel-default" ng-controller="BsShiftDetailCtrl">
	<div class="panel-heading">
		跨城巴士 / 发班计划 / 票池（班次号：{{shift.shiftNo}}）
        <span style="float: right; margin-top: -7px; height: 0px">
			<button type="submit" class="btn m-b-xs w-xs btn-info" ui-sref="app.bus.shift()">返回</button>
		</span>
	</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<div class="col-lg-12">
			<div class="panel panel-default">
				<div class="panel-body">班次信息</div>
			</div>
			<div class="table-responsive">
				<table class="table table-striped b-t b-light">
					<tbody>
						<tr>
							<td>班次号：{{shift.shiftNo}}</td>
							<td>班次状态：{{shift.status | busShiftFilter}} </td>
							<td>线路名：{{shift.routeName}}</td>
						</tr>
						<tr>
							<td>发班日期：{{shift.departDate | date : 'yyyy-MM-dd'}}</td>
							<td>始发城市：{{shift.fromCity}}</td>
							<td>终点城市：{{shift.toCity}}</td>
						</tr>
						<tr>
							<td>发班时间：{{shift.departTime | date : 'HH:mm:ss'}}</td>
							<td>始发站：{{shift.fromAddr}}</td>
							<td>终点站：{{shift.toAddr}}</td>
						</tr>
						<tr>
							<td>最低票价：{{shift.priceMin | number:2}}</td>
							<td>最高票价：{{shift.priceMax | number:2}}</td>
							<td>是否暂停：{{shift.paused ? '是':'否'}}</td>
						</tr>
						<tr>
							<td>总票数：{{shift.tickets}}</td>
							<td>已售票数：{{shift.ticketSold}}</td>
							<td>余票数：{{shift.ticketFree}}</td>
						</tr>
						<tr>
							<td>操作人员帐号：{{shift.staffName}}</td>
							<td>操作时间：{{shift.opTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
							<td>所属单位：{{organization.name}}</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<div class="col-lg-12">
			<div class="panel panel-default">
				<div class="panel-body">
					票池信息（红色为预留车票，黑色为用户已锁定车票）&nbsp;&nbsp;
					<button class="btn btn-primary" ng-click="rebuild(shiftId)">同步票池</button>
				</div>
			</div>
            <div class="col-md-12">
                <button ng-repeat="ticket in tickets" class="btn m-xs w-xs"
                ng-class="!ticket.locked ? 'btn-default' : (!ticket.hold ? 'btn-dark' : 'btn-danger')"
				ng-click="change(ticket)">
                    <i class="fa fa-ticket">{{ticket.ticket}}</i>
                </button>
				<table ng-if="!tickets || tickets.length <= 0" class="table table-striped b-t b-light">
					<tbody>
						<tr>
							<td colspan="11" style="text-align: center;">暂无票池信息，该班次的预售尚未开始或票池为空</td>
						</tr>
					</tbody>
				</table>
            </div>
		</div>

	</div>
</div>